//
// @Auther: by wujehy 
// @Email:wujehy@qq.com
// @Data:20-2-12
// @Time:下午7:07
//
#include <iostream>
#include "Common.h"


signal_context *global_context;
int testErr(){
    throw GeeJoan::E2EE::Common::CommonException(2,"rest");
}

int main(){
    int result;
    result = signal_context_create(&global_context, 0);
    GeeJoan::E2EE::Common::common_setup_crypto_provider(global_context, nullptr);
    std::cout<<"ok"<<std::endl;


    try {
        testErr();
    }catch (GeeJoan::E2EE::Common::CommonException &e){
        std::cout<<"data "<<e.code()<<std::endl;
        std::cout<<"msg "<<e.getErrMsg()<<std::endl;
        std::cout<<"msg "<<e.what()<<std::endl;
    }

}